<template>
	<view>
		<view v-if="Portrait==0">
			<view class="title">
				<view class="ProgressBar">
					<!-- ProgressBar_item_Select -->
					<view class="ProgressBar_item" :class="{ 'ProgressBar_item_Select': avicnt >= 1 }">
						<text v-if="avicnt >= 1">1</text>
						<text v-else></text>
					</view>
					<view class="ProgressBar_strip1" :class="{ 'ProgressBar_strip': avicnt >= 1 }">
						<view class="ProgressBar_strip_i"></view>
					</view>


					<view class="ProgressBar_item" :class="{ 'ProgressBar_item_Select': avicnt >= 2 }">
						<text v-if="avicnt >= 2">2</text>
						<text v-else></text>
					</view>
					<view class="ProgressBar_strip1" :class="{ 'ProgressBar_strip': avicnt >= 2 }">
						<view class="ProgressBar_strip_i"></view>
					</view>


					<view class="ProgressBar_item" :class="{ 'ProgressBar_item_Select': avicnt >= 3 }">
						<text v-if="avicnt >= 3">3</text>
						<text v-else></text>
					</view>
					<view class="ProgressBar_strip1" :class="{ 'ProgressBar_strip': avicnt >= 3 }">
						<view class="ProgressBar_strip_i"></view>
					</view>


					<view class="ProgressBar_item" :class="{ 'ProgressBar_item_Select': avicnt >= 4 }">
						<text v-if="avicnt >= 4">4</text>
						<text v-else></text>
					</view>

				</view>

				<view class="title_right">
					<text class="xiayibu">下一步</text>
					<text v-if="avicnt==1" @click="avicnt=2">人脸识别</text>
					<text v-if="avicnt==2">完善信息</text>
					<text v-if="avicnt==3">提交审核</text>
				</view>

			</view>

			<identity v-if="avicnt==1"></identity>

			<FaceRecognition v-if="avicnt==2"></FaceRecognition>
			
			<Retention  v-if="avicnt==3"></Retention>

		</view>

		<view v-else class="yuan_tot">
			<view class="yuan" @click="yuanFn('center')">
				
			</view>


			<view class="tishi">
				<view><img src='../../../static/shen/Slice 81@2x.png' /><br />避光遮挡</view>
				<view><img src='../../../static/shen/Slice 82@2x.png' /><br />光线充足</view>
				<view><img src='../../../static/shen/Slice 83@2x.png' /><br />正对手机</view>
			</view>
		</view>


		<!-- 身份证技巧 -->
		<uni-popup ref="popup" background-color="#fff" class="popup-content">
			<view>
				<view class="content">
					<view class="content_title">识别失败，还有 次机会</view>
					<view class="content_details">请识别本人有效期30天内的二代身份证，否则将无法通过审核</view>
					<view class="content_details_bnt" @click="woyuanFn()">我知道了</view>
				</view>
			</view>
		</uni-popup>

	</view>
</template>

<script>
	import identity from './component/identity.vue';
	import Retention from './component/Retention.vue';
	import FaceRecognition from './component/FaceRecognition.vue'
	export default {
		components: {
			identity,
			FaceRecognition,
			Retention
		},
		data() {
			return {
				avicnt: 1,
				Portrait: 1,
				NationalEmblem: 1,
				value: '',
				opportunitiesav: 1,
			}
		},
		onLoad(options) {  
			console.log(options)
			this.Portrait = options.param1
		  } ,
		created(){
			
		},
		methods: {
			yuanFn(type) {
				console.log('9090')
				this.avicnt = 3
				this.Portrait = 0
				// this.$refs.popup.open(type)
				// uni.navigateTo({
				// 	url: '/pages/message/Retention/Retention'
				// });
			},
			woyuanFn(){
				this.$refs.popup.close()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title {
		display: flex;
		justify-content: space-between;
		padding: 24rpx 40rpx 36rpx 40rpx;

		.xiayibu {
			width: 72rpx;
			height: 34rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			line-height: 28rpx;
			text-align: left;
			font-style: normal;
			text-transform: none;
			margin-right: 16rpx;
		}

		.title_right {
			// width: 96rpx;
			height: 34rpx;

			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #666666;
			line-height: 28rpx;
			text-align: left;
			font-style: normal;
			text-transform: none;

		}
	}

	.ProgressBar {
		display: flex;
		// justify-content: ;
		justify-items: center;
		align-items: center;

		.ProgressBar_item {
			width: 24rpx;
			height: 24rpx;
			background: #E5E5E5;
			border-radius: 25rpx;
		}

		.ProgressBar_strip {
			width: 32rpx;
			height: 1rpx;
			background: #E5E5E5;
			border-radius: 0rpx 0rpx 0rpx 0rpx;

			.ProgressBar_strip_i {
				width: 14rpx;
				height: 1rpx;
				background: #666666;
				border-radius: 0rpx 0rpx 0rpx 0rpx;
			}
		}

		.ProgressBar_strip1 {
			width: 32rpx;
			height: 1rpx;
			background: #E5E5E5;
			border-radius: 0rpx 0rpx 0rpx 0rpx;
		}

		.ProgressBar_item_Select {
			width: 36rpx;
			height: 36rpx;
			border-radius: 25rpx;
			border: 2rpx solid #666666;
			font-size: 24rpx;
			color: #0063FE;
			line-height: 36rpx;
			text-align: center;
			background-color: #fff;
		}
	}



	.yuan_tot{
		padding-top: 118rpx;
	}
	.yuan {
		width: 520rpx;
		height: 520rpx;
		border-radius: 300rpx;
		border: 20rpx solid #FFFFFF;
		margin: 0 auto;
		background-image: url('../../../static/shen/Slice 76@2x.png');
		background-size: 100%;
		background-repeat: no-repeat;
	}

	.tishi {
		display: flex;
		justify-content: space-between;
		margin-top: 174rpx;
		padding-left: 118rpx;
		padding-right: 118rpx;
		text-align: center;

		img {
			margin-bottom: 6rpx;
			width: 110rpx;
			height: 110rpx;
		}
	}

	.content {
		width: 630rpx;
		height: 524rpx;
		background: #FFFFFF;
		border-radius: 50rpx;

		.content_title {
			height: 56rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 40rpx;
			color: #333333;
			line-height: 47rpx;
			margin: 0 auto;
			text-align: center;
			margin-top: 72rpx;
			margin-bottom: 66rpx;
			// margin: 72rpx 0 20rpx 40rpx;
		}

		.content_details {
			width: 474rpx;
			height: 88rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #666666;
			line-height: 38rpx;
			margin: 0 auto;
			text-align: center;
			margin-bottom: 98rpx;
		}

		.content_details_bnt {
			width: 534rpx;
			height: 100rpx;
			color: #fff;
			background: #0063FE;
			border-radius: 52rpx 52rpx 52rpx 52rpx;
			margin: 0 auto;
			text-align: center;
			line-height: 100rpx;
			font-size: 35rpx;
		}
	}
</style>
<style>
	.popup-content {
		border-radius: 50rpx;

		uni-view {
			border-radius: 50rpx;
		}
	}
</style>